package com.youths.dao;

import com.youths.domain.ExpertInfo;
import com.youths.domain.LabelAdmin;
import com.youths.domain.LabelConsumer;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: KingRainGrey
 * Date: 2020/6/22
 */
public interface LabelConsumerMapper {
    LabelConsumer login(@Param("consumerPhone") String consumerPhone, @Param("password")  String password);

    LabelConsumer check(@Param("consumerPhone") String consumerPhone);

    int register(@Param("consumerPhone") String consumerPhone,
                 @Param("password") String password,
                 @Param("consumerName") String consumerName,
                 @Param("kind") int kind,
                 @Param("state") int state);

    List<LabelConsumer> getList(@Param("id") Integer id,
                                @Param("type") Integer type,
                                @Param("name") String name,
                                @Param("account") String account);


    Integer updatePassword(@Param("consumerId") Integer consumerId,
                           @Param("password") String password);

    List<LabelConsumer> getListByIdList(@Param("id") List<ExpertInfo> id);

    Integer createAccount(LabelConsumer labelConsumer);

    Integer updateConsumer(@Param("consumerId") Integer consumerId,
                           @Param("name") String name);
}
